package svc

import (
	"api/internal/config"
	"github.com/zeromicro/go-zero/zrpc"
	"taobao_svc/taobaoclient"
)

type ServiceContext struct {
	Config    config.Config
	TaoBaoRpc taobaoclient.Taobao
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:    c,
		TaoBaoRpc: taobaoclient.NewTaobao(zrpc.MustNewClient(c.TaoBaoRpc)),
	}
}
